package com.hwua.dao;

import com.hwua.entity.Product;
import com.hwua.entity.ProductCategory;

import java.util.List;

public interface IProCategoryDao {
    /**
     * 分类查询商品分类
     * @return
     */
    public List<ProductCategory> queryAll() throws Exception;

    /**
     * 二级分类个数
     * @param id
     * @return
     * @throws Exception
     */
    public int getCount(int id) throws Exception;

    /**
     * 查询商品二级分类
     * @return
     * @throws Exception
     */
    public List<ProductCategory> query() throws  Exception;

    /**
     * 根据id查询二级分类
     * @param parent_id
     * @return
     * @throws Exception
     */
    public List<ProductCategory> queryByID(int parent_id) throws Exception;

    /**
     * 根据id查找名字
     * @param id
     * @return
     * @throws Exception
     */
    public ProductCategory queryBySelfID(int id) throws Exception;
}
